package top.skihub.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.skihub.mapper.AddGoodsMapper;
import top.skihub.mapper.MineInfoMapper;
import top.skihub.pojo.Goods;
import top.skihub.pojo.MineInfo;
import top.skihub.service.MineInfoService;

import java.time.LocalDateTime;
import java.util.List;

@Service
public class MineInfoServiceImpl implements MineInfoService {



    @Autowired
    private MineInfoMapper mineInfoMapper;

    @Override
    public void addMineInfo(MineInfo mineInfo) {
        // 使用MineInfoMapper将mineInfo对象插入到数据库中
        mineInfoMapper.insert(mineInfo);
    }

    @Override
    public List<MineInfo> list(String email) {
        // 使用MineInfoMapper查询MineInfo对象
        return mineInfoMapper.list(email);
    }

    @Override
    public List<MineInfo> listAllMineInfo(String phone, String passwd) {
        return mineInfoMapper.getMineInfo(phone, passwd);
    }

    @Override
    public void updateMineInfo(MineInfo mineInfo) {
        mineInfoMapper.updateMineInfo(mineInfo);
    }
}
